﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace ProjectManagement.Domain.Entities
{
	public class User
	{
		public virtual int ID { set; get; }

		[Required(ErrorMessage="用户名不能为空")]
		[Display(Name="用户名")]
		public virtual string UserName { set; get; }

		[Display(Name = "真实姓名")]
		public virtual string RealName { set; get; }

		[Required(ErrorMessage = "密码不能为空")]
		[Display(Name = "密码")]
		[DataType(DataType.Password)]
		public virtual string Password { set; get; }
		[Display(Name = "生日")]
		[DisplayFormat(DataFormatString="yyyy-MM-dd")]
		public virtual DateTime? Birthday { set; get; }
		[Display(Name = "性别")]
		public virtual bool Sex { set; get; }
		[Display(Name = "邮箱")]
		[DataType(DataType.EmailAddress)]
		public virtual string Email { set; get; }
		[Display(Name = "手机号码")]
		public virtual string MobilePhone { set; get; }
		[Display(Name = "照片")]
		public virtual string ImageUrl { set; get; }
		[Display(Name = "所在省")]
		public virtual int Provience { set; get; }
		[Display(Name = "地市")]
		public virtual int City { set; get; }
		[Display(Name = "地址")]
		[DataType(DataType.MultilineText)]
		public virtual string Address { set; get; }
		public virtual DateTime? RegisterTime { set; get; }
		public virtual DateTime? LastLogonTime { set; get; }
		public virtual string IP { set; get; }
		public virtual bool Allowed { set; get; }


	}
}
